< previous page page_89 next page >

Page 89
8694cbadb9b1ef7075903f6f95fc1db2.gif
20:         tvTreeView.Top = tbToolBar.Height + picTitles.Height
21:     Else
22:         tvTreeView.Top = picTitles.Height
23:     End If
24:
25:   lvListView.Top = tvTreeView.Top
26:
27:     set the height
28:     If sbStatusBar.Visible Then
29:         tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles
30:         .Height + sbStatusBar.Height)
31:     Else
32:         tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles
33:         .Height)
34:     End If
35:
36:     lvListView.Height = tvTreeView.Height
37:     txtInput.Top = tvTreeView.Top
38:     txtInput.Height = tvTreeView.Height
39:     imgSplitter. Top = tvTreeView.Top
40:     imgSplitter.Height = tvTreeView.Height
41: End Sub

Finally, add the TextBox control to the form and name it txtInput.
Note
Don't worry about where you place the text box on the form. The
SizeControls routine will resize it and place it in the correct position.

In the TreeView double-click routine, you may not recognize one line of code:
txtInput.Text = Input(LOF(1), 1)
This code line uses two built-in functions to get the total length of the file (LOF) and then input that length of data into the TextBox control (Input). If you want to allow users to open any text file on the PC, use the Common Dialog control in the application. Replace the wizard-generated mnuFileOpen_Click routine with the code in Listing 3.3 to display the File Open dialog box and then input the file into the text box.

 
< previous page page_89 next page >

If you like this book, buy it!